1. Field of the Invention
The present invention relates to startup program execution methods, devices, storage mediums, and programs for starting up an OS through a boot process, and in particular, relates to startup program execution methods, devices, storage mediums, and programs for executing an arbitrary program before start-up of an OS.
2. Description of the Related Arts
Conventionally, in a personal computer which is a PC/AT compatible machine, as shown in FIG. 1, a hard disk drive 202 is built in a personal computer 200, and in accordance with needs, for example, a floppy (R) disk drive 204, a magneto-optical disk drive 206, a CD-ROM drive 208, and a USB memory 210 are externally connected.
FIG. 2 is a disk layout of a conventional hard disk drive, wherein a master boot record (MBR) 212 is present in the head sector having the head logical block address LBA0 of the disk, and a bootstrap loader, partition tables, and a boot signature are stored therein. Meanwhile, a boot program is stored in a boot sector 214 which is the head sector of a particular partition.
FIG. 3 is a disk layout of a floppy (R) disk for start-up, wherein no bootstrap loader is present, and a boot program is present in a boot sector 216. MOs, CD-ROMs, USB memories, etc. are recorded in the format of either FIG. 2 or FIG. 3.
FIG. 4 is a flow chart of a boot process targeting the disk layout of FIG. 2. In FIG. 4, when the power is turned on in a step S1, after self test of the processor is performed in a step S2, the BIOS (Basic Input Output System) is started in a step S3, the BIOS reads the contents recorded in the head sector of the disk at LBA0 as much as the sector length, generally 512 bytes, in a step S4, and stores them in a memory serving as the main storage of the personal computer in a step S5. Then, the BIOS transfers control to the head position of the stored data in a step S6. When control is transferred, the program stored in the position is executed. In the case of a hard disk drive, a bootstrap loader is recorded from the head of LBA0, therefore the bootstrap loader operates so as to load a boot sector, and the boot program is executed. The boot program loads an OS stored in the disk into the memory and executes it, thereby starting up the OS. Note that, in the case of a floppy (R) disk, a boot program is recorded from the head of LBA0, therefore the boot program is executed from the beginning. By the way, recently, in order to enhance the security of personal computers, password authentication is requested with respect to storage medium access by an application after the OS is started up. However, rather than taking measures in the application level, fairly high security can be ensured if a password authentication process or the like can be executed before the OS starts up after the power of the computer is turned on.
However, in the conventional boot process, when the power is turned on, the BIOS reads out the head sector (LBA0) of the disk drive and stores it in a memory, and transfers control to the head position of the stored contents so as to operate the bootstrap loader; therefore, when an arbitrary program is desired to be executed upon start-up, either change of the BIOS or change of the bootstrap loader has to be carried out. Note that, in the case of a floppy (R) disk, since no bootstrap loader is present, the boot program has to be changed. However, change of BIOSes has to be ordered to BIOS makers, thereby causing a problem of cost. Moreover, change of the contents of the head sector (LBA0) influences startup of the OS, thereby involving a problem of high risk.